package com.wiscamp.ninechapters.panels.application.command;

import cube.ddd.application.command.CommandObject;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

@Data
@EqualsAndHashCode(callSuper = true)
public class CreateApplicationCommand extends CommandObject {

    /**
     * 应用代码
     */
    @NotNull
    @NotBlank(message = "应用代码不能为空。")
    @Length(max = 50, message = "应用代码文本长度不能超过50。")
    private String applicationCode = "";

    /**
     * 应用名称
     */
    @NotNull
    @NotBlank(message = "应用名称不能为空。")
    @Length(max = 100, message = "应用名称文本长度不能超过100。")
    private String applicationName = "";

    /**
     * 应用分组
     */
    @Length(max = 50, message = "应用分组文本长度不能超过50。")
    private String applicationGroup = "";

    /**
     * 安全密钥
     */
    @Length(max = 50, message = "安全密钥文本长度不能超过50。")
    private String secretKey = "";

    /**
     * 备注
     */
    @Length(max = 250, message = "备注文本长度不能超过250。")
    private String remark = "";
}
